package com.yanfan.electronicPatrol;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.junit.jupiter.api.Test;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "测试DLL")
@RestController
public class test {
    @ApiOperation("cdsfed")
    @GetMapping("/dcd")
    public void Test(){
        int[] recordCount = new int[1];
        int result = LandwellLibrary.INSTANCE.PTcomm(1, 9600, recordCount);
        System.out.println("PTcomm result: " + result);

        byte[] record = new byte[8];
        result = LandwellLibrary.INSTANCE.PTrecord(1, record);
        System.out.println("PTrecord result: " + result);

    }

    @Test
    public void Test1(){
        int[] recordCount = new int[1];
        int result = LandwellLibrary.INSTANCE.PTcomm(1, 9600, recordCount);
        System.out.println("PTcomm result: " + result);

        byte[] record = new byte[8];
        result = LandwellLibrary.INSTANCE.PTrecord(1, record);
        System.out.println("PTrecord result: " + result);

    }
}
